
<!DOCTYPE html>

<html>
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
         <title><?php echo  NOMBRE_APLICACION ?> | Inicio </title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- Bootstrap 3.3.2 -->
    <link href="<?php echo ENLACE_WEB; ?>bootstrap/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons -->
    <link href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="<?php echo ENLACE_WEB; ?>bootstrap/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link href="<?php echo ENLACE_WEB; ?>bootstrap/dist/css/skins/skin-blue.min.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    
     <!-- REQUIRED JS SCRIPTS -->
    
    <!-- jQuery 2.1.3 -->
    <script src="<?php echo ENLACE_WEB; ?>bootstrap/plugins/jQuery/jQuery-2.1.3.min.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
   <!-- <script src="<?php echo ENLACE_WEB; ?>bootstrap/sistema/jquery.mobile-1.4.5.min.js"></script> -->
    <!-- Bootstrap 3.3.2 JS -->
    <script src="<?php echo ENLACE_WEB; ?>bootstrap/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <!-- AdminLTE App -->
    <script src="<?php echo ENLACE_WEB; ?>bootstrap/dist/js/app.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="<?php echo ENLACE_WEB; ?>bootstrap/sistema/jquery-ui.css">
<style>
  .ui-autocomplete-loading {
    background: white url("<?php echo ENLACE_WEB ?>bootstrap/sistema/carga.gif") right center no-repeat;
  }
</style>

    <!-- Optionally, you can add Slimscroll and FastClick plugins. 
          Both of these plugins are recommended to enhance the 
          user experience -->
  </head>
  <!--
  BODY TAG OPTIONS:
  =================
  Apply one or more of the following classes to get the 
  desired effect
  |---------------------------------------------------------|
  | SKINS         | skin-blue                               |
  |               | skin-black                              |
  |               | skin-purple                             |
  |               | skin-yellow                             |
  |               | skin-red                                |
  |               | skin-green                              |
  |---------------------------------------------------------|
  |LAYOUT OPTIONS | fixed                                   |
  |               | layout-boxed                            |
  |               | layout-top-nav                          |
  |               | sidebar-collapse                        |  
  |---------------------------------------------------------|
  
  -->
  <body class="skin-blue">
  
  <center>  
  <Strong>Informe día(s) <?php echo $titulo ?></strong>
  <br><br>

  <p>Informe de Facturas Emitidas y Cobros realizados</p>
<button class="btn bg-orange margin"  OnClick="fac()" style="cursor:pointer;"  > 
     <i class="fa fa-fw fa-print"></i> Imprimir Cierre  
</button>

   <iframe id="para_imprimir" width="1px" height="1px"  style="display:none"></iframe>


<script >
   function fac( ){
              document.getElementById("para_imprimir").src='<?php echo ENLACE_WEB; ?>mod_cierre/cierre_impresora.php?inicio=<?php echo $_POST['inicio']; ?>&fin=<?php echo $_POST['fin']; ?>'; }
</script>



    <table width="80%">


<tr style='background-color:#00a65a;'>
    	<td ><b>Factura</b></td>
    	<td><b>Cliente</b></td>
    	<td><b>Fecha</b></td>

    	<td><b>Mon</b></td>
    	<td><b>TC</b></td>

    	<td align='right'><b>SubTotal</b></td>
    	<td align='right'><b>Impuesto</b></td>
    	<td align='right'><b>Total</b></td><td></td>

    </tr>	



    	<?php echo $factura; ?>
        
        <tr><td colspan='10' style='font-size: 9pt'><hr  > </td></tr>
    	
    	<tr><Td colspan="6" align="right"><b>Total Colones </b> </td><Td align='center'> <?php  echo number_format($f[1] , 2, ',', ' ');  ?> </td><td> </td><td> </td></tr>
    	<tr><Td colspan="6" align="right"><b>Total Dolares </b> </td><Td align='center'> <?php  echo number_format($f[2] , 2, ',', ' ');  ?> </td><td> </td><td> </td></tr>
    
    
    </table>

<br><br><br>

<table width="90%">
	<tr style='background-color:#00a65a;'>
		<th nowrap="nowrap" >Pago Número</th>
    	<th nowrap="nowrap" >Factura</th>
    	<th>Cliente</th>
    	<th>Fecha</th>
    	<th>Forma de Pago</th>
    	<th>Usuario</th>
       	<td><b>TC</b></td>

    	<th>Total</th>

    </tr>	
   	<?php echo $tr; ?>
    
     <?php foreach($arreglo as $key => $valor ) {

           
            
            foreach ($valor as $moneda => $monto){
                 echo "<tr>
                            <td colspan='3'>$key</td>";
                 echo "<td> ".(($moneda==1)?"Colones":"Dolares")." </td>";
                 echo "<td> ".(($moneda==1)?"¢":"$")." ".numero_simple($monto)."</td>";
                 echo "</tr>";
             }
       
         
     }

    ?>


 </table>


 <br><br><hr><small>Informe Generado el día <?php echo date('d-m-Y');  ?></small>
</center>

</body>

</html>


